#ifndef __INTEGER__
#define __INTEGER__
#include <iostream>
#include <string>
#include <typeinfo>
#include <sstream>

using namespace std;

class Integer{


    public :

        friend Integer  operator+(const Integer& _num1,const Integer& _num2)
        {
            Integer temp(_num1);

            return ((temp.operator+=(_num2)));
        }

        friend Integer   operator-(const Integer& _num1,const Integer& _num2)
        {
            Integer temp(_num1);

            return ((temp.operator-=(_num2)));
        }

        friend Integer  operator+=(const Integer& _num1,const Integer& _num2)
        {
            return Integer(_num1+_num2);
        }

        friend Integer operator*(const Integer& _num1,const Integer& _num2)
        {
            return Integer(_num1.data*_num2.data);
        }

        friend Integer operator/(const Integer& _num1,const Integer& _num2)
        {

            return Integer(_num1.data/_num2.data);
        }

        friend bool operator>(const Integer& _num1,const Integer& _num2)
        {
            return ((_num1.operator>(_num2)));
        }

        template<typename T> T  friend operator<(T _num1,const Integer& _num2)
        {
            Integer temp(_num1);

            return ((temp.operator<(_num2)));
        }

        template<typename T> T  friend operator<=(T _num1,const Integer& _num2)
        {
            Integer temp(_num1);

            return ((temp.operator<=(_num2)));
        }

        template<typename T> T  friend operator>=(T _num1,const Integer& _num2)
        {
            Integer temp(_num1);

            return ((temp.operator>=(_num2)));
        }

        template<typename T> T  friend operator>=(const Integer& _num2,T _num1)
        {
            Integer temp(_num1);

            return ((_num2.operator>=(temp)));
        }

        template<typename T> T  friend operator==(const Integer& _num2,T _num1)
        {
            Integer temp(_num1);

            return ((temp.operator==(_num2)));
        }

        template<typename T> T  friend operator==(T _num1,const Integer& _num2)
        {
            Integer temp(_num1);

            return ((temp.operator==(_num2)));
        }

        friend int   operator<<(int _num1,const Integer& _num2)
        {
            return (_num1<<_num2.data);
        }

        friend int   operator>>(int _num1,const Integer& _num2)
        {
            return (_num1>>_num2.data);
        }

        friend int  operator|=(int _num1,const Integer& _num2)
        {
            return ((_num1 |= _num2.data));
        }

        template<typename T> operator T() const {return (T)data;}

                    Integer():data(0){};
                    //~Integer();
                    Integer(const Integer& _num):data(_num.data){};
                    Integer(const int& _num):data((int)_num){};
                    Integer(const float& _num):data((int)_num){};
                    Integer(const double& _num):data((int)_num){};
                    Integer(const string& _num);

        const int&  GetNum() const ;
        void        SetNum(int _num);
const   Integer&    operator=(const Integer& _num);//o.k
        Integer     operator-=(const Integer& _num);//o.k
        Integer     operator*=(const Integer& _num) ;//o.k
        Integer     operator%(const Integer& _num)const ;//o.k
        Integer     operator+=(const Integer& _num);//o.k
        Integer     operator~()const;//o.k
const   Integer&    operator ^=(const Integer& _num);
        bool        operator==(const Integer& _num)const;//o.k
        bool        operator>=(const Integer& _num)const;//o.k
        bool        operator<=(const Integer& _num)const;//o.k
        bool        operator<(const Integer& _num)const;//o.k
        bool        operator>(const Integer& _num)const;//o.k
const   Integer&    operator|=(const Integer& _num);
const   Integer&    operator&=(const Integer& _num);

                    operator string() const ;//o.k

        Integer&    operator++();
        Integer     operator++(int);
        Integer&    operator--();
        Integer     operator--(int);

        private:
            int data;
};

ostream&       operator<<(ostream& os,const Integer& _dbl);
istream&       operator>>(istream& is,  Integer& _dbl);


#endif //__INTEGER__
